﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Universitet_Fakyltet
{
    class Department
    {
        public string nameOfDepartment;

        public void FillMeaningsAboutDepartment()
        {
            int countMembersOfList = 0;
            string choice = "yes";
            List<Group> groups = new List<Group>();

            do
            {
                Group groupSample = new Group();
                groupSample.FillMeaningsAboutGroups();
                Console.WriteLine("Введите название кафедры: ");
                nameOfDepartment = Console.ReadLine();
                Console.WriteLine("Хотите добавить еще одну кафедру: ");
                choice = Console.ReadLine();
                groups.Add(groupSample);
                countMembersOfList++;
            }
            while (choice == "yes");
        }

        public void ShowInfoAboutDepartment(List<Group> groups, int countMembersOfList)
        {
            Console.WriteLine("Название кафедры: {0}", nameOfDepartment);
            for (int i = 0; i < countMembersOfList; i++)
            {
                Console.WriteLine("Имя группы: {0}", groups[i].nameOfGroup);
                Console.WriteLine("Курс: {0}", groups[i].numberOfCourse);
            }
        }
    }
}
